package com.gg.admin.goods.contorller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.gg.admin.goods.service.GoodsService;

import helpers.baseservlet.BaseServlet;
import povos.Goods;

@WebServlet("/admin/AdminShowAllHotGoodsServlet")
public class AdminShowAllHotGoodsServlet extends BaseServlet {
	@Autowired
	private GoodsService goodsService;
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		List<Goods>  goods = goodsService.showAllHotGoods();
		request.getSession().setAttribute("goods", goods);
		response.sendRedirect("/fruits/BSindex7.jsp");
	}


}
